﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    x:Class="RootfusBuiltinAddins.TFile.TFileUIConfig"
    Height="Auto" Width="Auto" x:Name="ConfigSIControl">
	<UserControl.Resources>
		<DataTemplate x:Key="ROOTFileListTemplate">
			<DockPanel Width="Auto" Height="Auto" LastChildFill="False">
				<Label HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Height="Auto" Content="{Binding Mode=OneWay}" DockPanel.Dock="Top"/>
				<DockPanel Width="Auto" Height="Auto" DockPanel.Dock="Bottom">
					<Button Width="Auto" Height="21.96" Content="Remove" Click="ButtonRemove_Click" CommandParameter="{Binding Mode=OneWay}"/>
				</DockPanel>
			</DockPanel>
			<DataTemplate.Triggers>
				<Trigger Property="RecognizesAccessKey" Value="False"/>
			</DataTemplate.Triggers>
		</DataTemplate>
		<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBoxItem}">
						<Border SnapsToDevicePixels="true" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
    <DockPanel LastChildFill="False" DataContext="{Binding dude}">
        <DockPanel LastChildFill="False" DockPanel.Dock="Top">
            <Label Height="28" x:Name="TextDescription" DockPanel.Dock="Left" Content="ROOT Files"/>
            <Button DockPanel.Dock="Right" Name="AddNewFile" ToolTip="Combine With Another ROOT File" Click="AddNewFile_Click" >Add</Button>
        </DockPanel>
    	<ListBox d:UseSampleData="True" Width="Auto" Height="Auto" DockPanel.Dock="Bottom" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" ItemTemplate="{DynamicResource ROOTFileListTemplate}" ItemsSource="{Binding Path=ROOTFileList, ElementName=ConfigSIControl, Mode=Default}" IsSynchronizedWithCurrentItem="True" x:Name="ListOfFiles" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
    </DockPanel>
</UserControl>
